/*
* @描述: 
* @创建者: kilomChou
* @Date: 2021-05-03 17:09:34
* @最后编辑: kilomChou
 * @LastEditTime: 2021-05-06 08:34:54
*/
import { Proto } from "../../common/data/Proto";
import { ISize } from "../../common/core/vec2/Vec2";
import { Conn } from "../net/Conn";
import BaseModel from "./BaseModel";

export default class WorldModCls extends BaseModel {

    /** 单例 */
    private constructor() { super(); }
    /** 实例 */
    static readonly ins = new WorldModCls();

    /** 世界大小 */
    worldSize: ISize
    /** 屏幕焦点蛇节点id */
    focusSnakeNodeId: number

    listenProto(): void {
        Conn.on(Proto.S2C_SCREEN_FOCUS, data => {
            this.focusSnakeNodeId = data.nodeId;
        })
    }

}

export const WorldMod = WorldModCls.ins;